<template>
  <div class="help">
    <Nav :activeNav="activeNav" :navList="navList" @clickNav="handleClickNav" />
    <RetrievalHelp v-if="activeNav == 'js'" />
    <Grammar v-if="activeNav == 'yf'" />
    <IpcClassify v-if="activeNav == 'ipc'" />
    <!-- <iframe
      :src="iframeSrc"
      frameborder="0"
      width="100%"
      height="100%"
    ></iframe> -->
  </div>
</template>
<script>
export default {
  data() {
    return {
      activeNav: "js",
      navList: [
        {
          label: "检索帮助",
          type: "js",
        },
        {
          label: "检索式语法说明",
          type: "yf",
        },
        {
          label: "IPC分类",
          type: "ipc",
        },
      ],
      // iframeSrc: "",
    };
  },
  methods: {
    handleClickNav(item) {
      this.activeNav = item.type;
    },
  },
  created() {
    //
  },
  mounted() {
    // this.iframeSrc = `${window.globalUrl.url}api/file/preview/${window.configure.retrieveHelp}`;
  },
  components: {
    Nav: () => import("../components/nav.vue"),
    RetrievalHelp: () => import("../components/retrievalHelp.vue"),
    Grammar: () => import("../components/grammar.vue"),
    IpcClassify: () => import("../components/ipcClassify.vue"),
  },
};
</script>
<style lang="scss" scoped>
// .help {
//   height: calc(100vh - 0.7rem - 74px - 50px - 25px);
// }
</style>
